package com.lidong.zc.databasemodel.init.core;

import com.alibaba.druid.pool.DruidPooledConnection;
import com.lidong.zc.databasemodel.constants.enumconst.SqlTypeEnum;
import com.lidong.zc.databasemodel.entity.database.DataBaseTable;
import org.springframework.jdbc.core.JdbcTemplate;

import java.util.List;

/**
 * @author LiDong
 * @version 1.0.0
 * @createTime 9/10/2022 11:06 AM
 */
public class InitDataBaseContext {

    /**
     * 数据库类型
     */
    private SqlTypeEnum sqlType;

    /**
     * druid pooled connection
     */
    private DruidPooledConnection druidPooledConnection;

    /**
     * JdbcTemplate
     */
    private JdbcTemplate jdbcTemplate;

    /**
     * 数据库所有的表
     */
    private List<DataBaseTable> dataBaseTableList;

    public InitDataBaseContext(SqlTypeEnum dbType, DruidPooledConnection druidPooledConnection) {
        sqlType = dbType;
        this.druidPooledConnection = druidPooledConnection;
    }

    public InitDataBaseContext() {
    }

    public SqlTypeEnum getSqlType() {
        return sqlType;
    }

    public void setSqlType(SqlTypeEnum sqlType) {
        this.sqlType = sqlType;
    }

    public DruidPooledConnection getDruidPooledConnection() {
        return druidPooledConnection;
    }

    public void setDruidPooledConnection(DruidPooledConnection druidPooledConnection) {
        this.druidPooledConnection = druidPooledConnection;
    }

    public List<DataBaseTable> getDataBaseTableList() {
        return dataBaseTableList;
    }

    public void setDataBaseTableList(List<DataBaseTable> dataBaseTableList) {
        this.dataBaseTableList = dataBaseTableList;
    }

    public JdbcTemplate getJdbcTemplate() {
        return jdbcTemplate;
    }

    public void setJdbcTemplate(JdbcTemplate jdbcTemplate) {
        this.jdbcTemplate = jdbcTemplate;
    }
}
